package cn.xf.service.impl;

import cn.xf.dao.ISysLogDao;
import cn.xf.domain.SysLog;
import cn.xf.service.ISysLogService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author xiaofu
 * @date 2021-05-18 14:18
 * @email dearaf@163.com
 */
@Service
@Transactional
public class SysLogServiceImpl implements ISysLogService {


    @Autowired
    private ISysLogDao sysLogDao;

    @Override
    public void save(SysLog sysLog) {
        sysLogDao.save(sysLog);
    }

    @Override
    public List<SysLog> findAll() {
        return sysLogDao.findAll();
    }

    @Override
    public List<SysLog> findAllByPage(Integer page, Integer pageSize) {
        PageHelper.startPage(page,pageSize);
        return sysLogDao.findAll();
    }
}
